package com.cloudweb.oa.api;

import cn.js.fan.util.ErrMsgException;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cloudweb.oa.vo.Result;
import com.redmoon.oa.flow.*;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

public interface IWorkflowPlusService {

    boolean rollBack(@RequestParam(value = "actionId") Integer actionId, boolean isRollBackData);

    boolean doAlter(WorkflowDb wf, Leaf lf);

    void doAlterOnSubmit(WorkflowPredefineDb wfp, WorkflowDb wf, MyActionDb mad) throws ErrMsgException;

    int FinishActionBatch(HttpServletRequest request, String ids) throws ErrMsgException;

    boolean finishActionSingle(HttpServletRequest request, MyActionDb mad, String userName, StringBuffer sb) throws ErrMsgException;

    boolean appendUser(JSONObject jsonObject) throws ErrMsgException;

    boolean convertToRedDocument(Integer flowId, Integer attachId, Integer templateId, int inRedMode) throws ErrMsgException;

    boolean generateRedDocument(Integer flowId, Integer templateId, int inRedMode, String name) throws ErrMsgException;

    boolean doActionFormToNextMap(WorkflowDb wf, WorkflowActionDb action, WorkflowActionDb privAction) throws ErrMsgException;

    boolean generateRedDocument(long id, String formCode, Integer templateId, int mode, String name) throws ErrMsgException;
}
